/*程序清单3.1:platinum.c --your weight in platinum */
/*Author:乾哥*/
/*Date:2022-04-25*/
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
    float weight;//你的体重
    float value;//相等重量的白金价值

    printf("Are you worth your weight in platinum?\n");
    printf("Let's check it out.\n");
    printf("Please enter your weight in pounds:");

    scanf("%f",&weight);//获取用户的输入
    value=1700.0*weight*14.5833;//假设白金的价格是每盎司$1700,14.5833用于把英镑常衡盎司转换为金衡盎司
    printf("------------------------------------------\n");
    printf("Your weight in platinum is worth \033[31m $%.2f \033[0m.\n",value);
    printf("You are easily worth that! If platinum prices drop,\n");
    printf("eat more to maintain your value.\n");

    return 0;
}
